package cards;

import model.Board;
import model.Player;
import view.Boundary;

public class GoToReceiveStart extends GoTo {
	private int position;
	
	public GoToReceiveStart(String text, int position) {
		super(text);
		this.position = position;
	}

	@Override
	public void execute(Player player) {
		Boundary.showMessage(getText());
		if(player.getPosition() > this.position){
			player.deposit(Board.startBonus);
		}
		player.setPosition(this.position);
		Board.fields[this.position - 1].landOnField(player);
	}
}